package com.store.app.bean;

import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Administrator on 2016/2/25.
 */
public class PosterInfo implements Parcelable {
    private Bitmap bitamp;//图片
    private String uri;//图片在手机中的Uri
    private String field;//海报位置

    public Bitmap getBitamp() {
        return bitamp;
    }

    public void setBitamp(Bitmap bitamp) {
        this.bitamp = bitamp;
    }

    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    public String getField() {
        return field;
    }

    public void setField(String field) {
        this.field = field;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeParcelable(this.bitamp, 0);
        dest.writeString(this.uri);
        dest.writeString(this.field);
    }

    public PosterInfo() {
    }

    protected PosterInfo(Parcel in) {
        this.bitamp = in.readParcelable(Bitmap.class.getClassLoader());
        this.uri = in.readParcelable(Uri.class.getClassLoader());
        this.field = in.readString();
    }

    public static final Parcelable.Creator<PosterInfo> CREATOR = new Parcelable.Creator<PosterInfo>() {
        public PosterInfo createFromParcel(Parcel source) {
            return new PosterInfo(source);
        }

        public PosterInfo[] newArray(int size) {
            return new PosterInfo[size];
        }
    };
}
